Add :distant-foreground to faces.
authorJan D. <jan.h.d@swipnet.se>
Fri, 1 Nov 2013 15:47:10 +0000 (16:47 +0100)
committerJan D. <jan.h.d@swipnet.se>
Fri, 1 Nov 2013 15:47:10 +0000 (16:47 +0100)
commit3370077b1641c437024ed67635088e911ed4ce33
treebfc8254e57143376fd95f59736454afc67b40ab1
parentf7f3ee1cb27e70857c646258b97b6509a2fd1eee
Add :distant-foreground to faces.

* doc/lispref/display.texi (Face Attributes): Document :distant-foreground.

* etc/NEWS: Mention :distant-foreground.

* lisp/faces.el (face-x-resources): Add :distant-foreground.
(region): Use :distant-foreground for gtk and ns.

* src/dispextern.h (lface_attribute_index): Add
LFACE_DISTANT_FOREGROUND_INDEX.

* src/xfaces.c: Declare color_distance.
(QCdistant_foreground): New variable.
(NEAR_SAME_COLOR_THRESHOLD): New define.
(load_color2): New function.
(load_color): Call load_color2.
(load_face_colors): Call load_color2 and if distant-color is specified
calculate distant and use distant-color if colors are near.
(LFACE_DISTANT_FOREGROUND): New define.
(merge_face_ref, Finternal_set_lisp_face_attribute)
(Finternal_get_lisp_face_attribute)
(x_supports_face_attributes_p): Handle distant-foreground similar to
foreground.
(syms_of_xfaces): DEFSYM QCdistant_foreground.
doc/lispref/ChangeLog
doc/lispref/display.texi
etc/ChangeLog
etc/NEWS
lisp/ChangeLog
lisp/faces.el
src/ChangeLog
src/dispextern.h
src/xfaces.c